package com.cwj.film.fieter;

import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class cross_domain_filter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        HttpServletResponse response=(HttpServletResponse) servletResponse;
        response.addHeader( "Access-Control-Allow-Origin", "*" );
        filterChain.doFilter(servletRequest,response);
    }
}
